import 'reflect-metadata'
import {ExceptionFilter,defineModule} from "./index";

export function UseFilters(...filters: any[]) {
    return function (target: Function | Object,propertyKey?: string, descriptor?: PropertyDescriptor) {
        // 如果有值表示方法装饰器
        if(descriptor){
            Reflect.defineMetadata('filters',filters,descriptor.value)
        }else{
            //如果是类装饰器 绑定到类上
            Reflect.defineMetadata('filters',filters,target)
        }
    }
}
